<template>
    <div :class="`goods ${data.class.col_num} ${data.class.radius}`"
         :style="{'margin-bottom': data.style.margin_bottom+'px',
         'margin-left':data.style.margin_x+'px', 'margin-right': data.style.margin_x+'px'}"
    >
        <div class="goods_ul">
            <div class="goods_li" v-for="li in data.list.slice(0, data.config.num)">
                <div class="goods_li_img">
                    <img class="img" :src="li.image" />
                </div>
                <div class="goods_li_con">
                    <div class="goods_li_title">{{li.title}}</div>
                    <div class="d_flex flex_ai_c mb5">
                        <div class="line_price" v-if="li.line_price>li.price">￥{{li.line_price}}</div>
                        <div class="price">￥{{li.price}}</div>
                    </div>
                    <div class="d_flex flex_ai_c flex_jc_sb">
                        <div class="cart">
                            <ShoppingCart />
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>

<script setup lang="ts">
const props = defineProps<{
    data: any
}>()
</script>

<style lang="scss">
@use "src/views/site/diy/style.css";
</style>
